package com.axjy.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.axjy.mapper.YiCardUserMapper;
import com.axjy.pojo.YiCardUser;
import com.axjy.service.YiCardUserService;
import com.axjy.util.Pager;

@Transactional
@Service("yiCardUserService")
public class YiCardUserServiceImpl implements YiCardUserService{

	@Resource
	private YiCardUserMapper yiCardUserMapper;

	@Transactional(readOnly=true)
	@Override
	public Pager pager(Integer offset, Integer limit, String columnName, String columnValue) {
		Pager pager=new Pager();
		pager.setRows(yiCardUserMapper.search(offset, limit, columnName, columnValue));
		pager.setTotal(yiCardUserMapper.getTotal(columnName, columnValue));
		return pager;
	}
	
	@Override
	public int addYiCardUser(YiCardUser yiCardUser) {
		return yiCardUserMapper.addYiCardUser(yiCardUser);
	}

	@Override
	public int searchuId(String uCard) {
		return yiCardUserMapper.searchuId(uCard);
	}

	@Override
	public int updateState(YiCardUser yiCardUser) {
		return yiCardUserMapper.updateState(yiCardUser);
	}

}
